﻿<UserControl x:Class="WeatherClockWidget.ForecastItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             MouseLeftButtonDown="UserControl_MouseLeftButtonDown">
    <Grid Margin="3,10,3,10">
        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
            <TextBlock Name="Day" Text="Mon" FontWeight="Light" HorizontalAlignment="Center"/>
            <Image Name="Icon" Source="Resources\Weather\weather_1.png" Width="48" Height="48" HorizontalAlignment="Center">
                <Image.RenderTransform>
                    <TranslateTransform x:Name="Transform"/>
                </Image.RenderTransform>
                <Image.Resources>
                    <Storyboard x:Key="FlipAnim1">
                        <DoubleAnimation x:Name="TransformAnim1" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Y" From="0" To="10" Duration="0:0:0.3" Completed="DoubleAnimation_Completed"/>
                        <DoubleAnimation x:Name="OpacityAnim1" Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
                    </Storyboard>
                    <Storyboard x:Key="FlipAnim2">
                        <DoubleAnimation x:Name="TransformAnim2" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Y" From="-10" To="0" Duration="0:0:0.3"/>
                        <DoubleAnimation x:Name="OpacityAnim2" Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
                    </Storyboard>
                </Image.Resources>
            </Image>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <TextBlock Name="TemperatureH" Text="0⁰" FontSize="14"/>
                <TextBlock Name="TemperatureL" Text="0⁰" Margin="3,0,0,0" FontSize="14"/>
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
